#ifndef TSUBTITLES_H_

	#define TSUBTITLES_H_

	#include <iostream>
	#include <math.h>

	using namespace std;

	// operator << sintax
	const char SUBT_FIRST = '(';
	const char SUBT_SEPARATION = ' ';
	const char SUBT_LAST = ')';


	class TTime
	{
		
		public:
		
			TTime(void);
			
			TTime(int sec1, int min1=0, int h1=0);
			
			TTime(const TTime &t);
			
			~TTime(void);
			
			TTime& operator=(const TTime &t);
			
			void SetTime(int sec1, int min1=0, int h1=0);
			
			void SetTimeMin(int min1);
			
			void SetTimeHour(int h1);
			
			int GetSec(void) const;
			
			int GetMin(void) const;
			
			int GetHour(void) const;
			
//			Normalice(void);
			
			bool operator==(const TTime &t) const;
			
			bool operator!=(const TTime &t) const;
			
			bool operator<(const TTime &t) const;
			
			bool operator>(const TTime &t) const;
			
			
		private:
		
			int sec, min, hour;
			
			
	};

	class TSubtitle
	{
		// operator << overload
		friend ostream & operator<<(ostream &os, const TSubtitle &s);

		public:
            // Default constructor
			TSubtitle(void);

            // Default constructor
			TSubtitle( int sec, int min=0, int h=0);

			// Constructor overload
			TSubtitle( string text, int sec, int min=0, int h=0);

			// Copy constructor
			TSubtitle(const TSubtitle &s);

			// Destructor
			~TSubtitle(void);


			// Asignation operator
			TSubtitle &operator=(const TSubtitle &s);
			
			void SetID(int iD);

			void SetText(string new_text);

			// Set Start time

			void SetSTime(int sec, int min=0, int h=0);
			
			// Set Finish time			
			
			void SetFTime(int sec, int min=0, int h=0);
 			

			// operator == overload
			bool operator==(const TSubtitle &s) const;

			// operator != overload
			bool operator!=(const TSubtitle &s) const;
			
			bool operator<(const TSubtitle &s) const;
			
			bool operator>(const TSubtitle &s) const;

			
			int GetID(void) const;

			string GetText(void) const;

			int GetFTime(char c) const;
			
			int GetSTime(char c) const;
			
			// profile getProfile(void) const;
		
	private:
			// Inner text;
			string text;

			// Profile
			 // profile pro; 
			
			//ID
			
			int id;

			// Start and finish time
			TTime start, finish;
	};		
		
		
#endif
